<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css" media="screen"/>
</head>
<body>
<header th:replace="common/top"></header>
<div id="Content">
    <div id="BackLink">
        <a th:href="@{/catalog/viewProduct?productId=}+${product.productId}">
            <button type="button" class="btn btn-sm btn-primary" th:text="'Return to '+${product.productId}"></button>
          </a>
    </div>

    <div id="Catalog">

        <table>
            <tr>
                <td>
                    <img th:src="${product.getDescriptionImage()}">
                    <label th:text="${product.getDescriptionText()}"></label>
                </td>
            </tr>
            <tr>
                <td><b th:text="${item.itemId}">item id</b></td>
            </tr>
            <tr>
                <td><b><font size="4" th:text="${item.attribute1}"> attribute</font></b></td>
            </tr>
            <tr>
                <td th:text="${product.name}">product name</td>
            </tr>
            <tr>
                <td>
                    <label th:if="${item.quantity <= 0}"> Back ordered.</label>
                    <label th:if="${item.quantity>0}" th:text="${item.quantity}+'in stock'">Quantity in stock</label>
                </td>
            </tr>
            <tr>
                <td th:text="'$'+${#numbers.formatDecimal(item.listPrice,1,2)}">
                    Item List Price
                </td>
            </tr>
            <tr>
                <td>
                    <a th:href="@{/cart/addItemToCart?workingItemId=}+${item.itemId}"><button type="button" class="btn btn-success">Add to Cart</button></a>
                </td>
            </tr>
        </table>

    </div>
</div>
<footer th:replace="common/bottom"></footer>
</body>
</html>